1. Field of the Invention
The present invention relates to a magnetic sensor including a magnetic detection element and a bias magnetic field generation unit, the bias magnetic field generation unit generating a bias magnetic field to be applied to the magnetic detection element.
2. Description of the Related Art
In recent years, magnetic sensor systems have been employed to detect a physical quantity associated with the rotational movement or linear movement of a moving object in a variety of applications. Typically, a magnetic sensor system includes a scale and a magnetic sensor, and the magnetic sensor is configured to generate a signal associated with the relative positional relationship between the scale and the magnetic sensor.
The magnetic sensor includes a magnetic detection element for detecting a magnetic field to be detected. Hereinafter, the magnetic field to be detected will be referred to as the target magnetic field. U.S. Pat. No. 6,661,225 B2, JP 2008-151759A, and JP 2012-185044A each disclose a magnetic sensor that uses a so-called spin-valve magnetoresistance (MR) element as the magnetic detection element. The spin-valve MR element includes a magnetization pinned layer having a magnetization pinned in a certain direction, a free layer having a magnetization that varies depending on the target magnetic field, and a nonmagnetic layer located between the magnetization pinned layer and the free layer. Examples of the spin-valve MR element include a TMR element in which the nonmagnetic layer is a tunnel barrier layer, and a GMR element in which the nonmagnetic layer is a nonmagnetic conductive layer.
Some magnetic sensors have means for applying a bias magnetic field to the magnetic detection element. The bias magnetic field is used to allow the magnetic detection element to respond linearly to a variation in the strength of the target magnetic field. In a magnetic sensor that uses a spin-valve MR element, the bias magnetic field is used also to make the free layer have a single magnetic domain and to orient the magnetization of the free layer in a certain direction, when there is no target magnetic field.
U.S. Pat. No. 6,661,225 B2 and JP 2008-151759A each disclose a magnetic sensor including a spin-valve MR element, and a permanent magnet for generating a bias magnetic field.
JP 2012-185044A discloses a magnetic sensor including a spin-valve MR element, and an antiferromagnetic layer that is in contact with the free layer of the MR element and induces an exchange coupling magnetic field between the free layer and itself.
Magnetic sensors that use a permanent magnet as the means for generating a bias magnetic field, such as those disclosed in U.S. Pat. No. 6,661,225 B2 and JP 2008-151759A, have the following problems. Such magnetic sensors are typically used under the condition that the strength of the target magnetic field does not exceed the coercivity of the permanent magnet. However, since the magnetic sensors can be used in various environments, an external magnetic field having a strength exceeding the coercivity of the permanent magnet can happen to be temporarily applied to the permanent magnet. When such an external magnetic field is temporarily applied to the permanent magnet, the magnetization direction of the permanent magnet may be changed from an original direction and then remain different from the original direction even after the external magnetic field disappears. In such a case, the direction of the bias magnetic field differs from a desired direction.
On the other hand, as described in JP 2012-185044A, a magnetic sensor having an antiferromagnetic layer in contact with the free layer of the MR element has the following first and second problems. The first problem is that the antiferromagnetic layer is exchange-coupled to the free layer to create magnetic anisotropy in the free layer, and as a result, the free layer increases in coercivity, and the linearity of a response of the MR element to the target magnetic field can thus possibly deteriorate. The second problem is that atoms constituting the antiferromagnetic layer, such as Mn atoms in a Mn-based antiferromagnetic material such as IrMn, may diffuse into the free layer, and as a result, the magnetoresistance change ratio of the MR element may be reduced.